<%--
  Created by IntelliJ IDEA.
  User: 斋藤飞鸟の翼
  Date: 2020/11/10
  Time: 19:32
  To change this template use File | Settings | File Templates.
--%>
<%@include file="../common/IncludeTop.jsp"%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<div id="BackLink">
    <a href="category?categoryId=${sessionScope.product.categoryId}">
        Return to ${sessionScope.product.categoryId}
    </a>
</div>

<div id="Catalog">

    <h2>${sessionScope.product.name}</h2>

    <table>
        <tr>
            <th>Item ID</th>
            <th>Product ID</th>
            <th>Description</th>
            <th>List Price</th>
            <th>&nbsp;</th>
        </tr>
        <!-- list -->
        <c:forEach var="item" items="${sessionScope.itemList}">
        <tr>
            <td><a href="item?itemId=${item.itemId}">${item.itemId}</a></td>
            <td>${item.product.productId}</td>
            <td>${item.attribute1} ${item.attribute2} ${item.attribute3}
                ${item.attribute4} ${item.attribute5} ${sessionScope.product.name}
            </td>
            <td><fmt:formatNumber value = "${item.listPrice}" pattern="$#,##0.00"/>
            </td>
            <td><a class="Button" href="add?workingItemId=${item.itemId}">Add
                to Cart</a></td>
        </tr>
        </c:forEach>
    </table>
</div>
<%@include file="../common/IncludeBottom.jsp"%>

